package com.sxbbc.common.core.mapper.jz;

import com.sxbbc.common.core.dto.jz.BAccountVO;
import com.sxbbc.common.core.entity.jz.BAccount;

import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;

import java.math.BigDecimal;

/**
 * <p>
 * 店铺账户表 Mapper 接口
 * </p>
 *
 * @author xiaoky
 * @since 2019-06-04
 */
public interface BAccountMapper extends BaseMapper<BAccount> {

	BAccount getByBid(Integer bid);

	int updateLockVersion(BAccount account);
	
	/**
	 * 
	 * 分页查询商家账户列表
	 * @author Wahyee
	 */
	IPage<BAccountVO> queryPage(IPage<BAccountVO> page,@Param("vo") BAccountVO vo);

	/**
	 * 查询商家总值
	 * @param type 1 money 2 point 3 qr_money 4 freeze_money
	 * @return
	 */
    BigDecimal sumTotalByType(@Param("type") Integer type);
}
